﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x020002D5 RID: 725
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class ChestInfo : IMessage<ChestInfo>, IMessage, IEquatable<ChestInfo>, IDeepCloneable<ChestInfo>, IBufferMessage
	{
		// Token: 0x17000964 RID: 2404
		// (get) Token: 0x0600206C RID: 8300 RVA: 0x0005BEF1 File Offset: 0x0005A0F1
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<ChestInfo> Parser
		{
			get
			{
				return ChestInfo._parser;
			}
		}

		// Token: 0x17000965 RID: 2405
		// (get) Token: 0x0600206D RID: 8301 RVA: 0x0005BEF8 File Offset: 0x0005A0F8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return ChestInfoReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x17000966 RID: 2406
		// (get) Token: 0x0600206E RID: 8302 RVA: 0x0005BF0A File Offset: 0x0005A10A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return ChestInfo.Descriptor;
			}
		}

		// Token: 0x0600206F RID: 8303 RVA: 0x0005BF11 File Offset: 0x0005A111
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChestInfo()
		{
		}

		// Token: 0x06002070 RID: 8304 RVA: 0x0005BF19 File Offset: 0x0005A119
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChestInfo(ChestInfo other) : this()
		{
			this.chestType_ = other.chestType_;
			this.openedNum_ = other.openedNum_;
			this.existNum_ = other.existNum_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x06002071 RID: 8305 RVA: 0x0005BF56 File Offset: 0x0005A156
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChestInfo Clone()
		{
			return new ChestInfo(this);
		}

		// Token: 0x17000967 RID: 2407
		// (get) Token: 0x06002072 RID: 8306 RVA: 0x0005BF5E File Offset: 0x0005A15E
		// (set) Token: 0x06002073 RID: 8307 RVA: 0x0005BF66 File Offset: 0x0005A166
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChestType ChestType
		{
			get
			{
				return this.chestType_;
			}
			set
			{
				this.chestType_ = value;
			}
		}

		// Token: 0x17000968 RID: 2408
		// (get) Token: 0x06002074 RID: 8308 RVA: 0x0005BF6F File Offset: 0x0005A16F
		// (set) Token: 0x06002075 RID: 8309 RVA: 0x0005BF77 File Offset: 0x0005A177
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint OpenedNum
		{
			get
			{
				return this.openedNum_;
			}
			set
			{
				this.openedNum_ = value;
			}
		}

		// Token: 0x17000969 RID: 2409
		// (get) Token: 0x06002076 RID: 8310 RVA: 0x0005BF80 File Offset: 0x0005A180
		// (set) Token: 0x06002077 RID: 8311 RVA: 0x0005BF88 File Offset: 0x0005A188
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint ExistNum
		{
			get
			{
				return this.existNum_;
			}
			set
			{
				this.existNum_ = value;
			}
		}

		// Token: 0x06002078 RID: 8312 RVA: 0x0005BF91 File Offset: 0x0005A191
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as ChestInfo);
		}

		// Token: 0x06002079 RID: 8313 RVA: 0x0005BFA0 File Offset: 0x0005A1A0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(ChestInfo other)
		{
			return other != null && (other == this || (this.ChestType == other.ChestType && this.OpenedNum == other.OpenedNum && this.ExistNum == other.ExistNum && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x0600207A RID: 8314 RVA: 0x0005BFFC File Offset: 0x0005A1FC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.ChestType != ChestType.MapInfoChestTypeNone)
			{
				num ^= this.ChestType.GetHashCode();
			}
			if (this.OpenedNum != 0U)
			{
				num ^= this.OpenedNum.GetHashCode();
			}
			if (this.ExistNum != 0U)
			{
				num ^= this.ExistNum.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x0600207B RID: 8315 RVA: 0x0005C073 File Offset: 0x0005A273
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x0600207C RID: 8316 RVA: 0x0005C07B File Offset: 0x0005A27B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x0600207D RID: 8317 RVA: 0x0005C084 File Offset: 0x0005A284
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.OpenedNum != 0U)
			{
				output.WriteRawTag(8);
				output.WriteUInt32(this.OpenedNum);
			}
			if (this.ChestType != ChestType.MapInfoChestTypeNone)
			{
				output.WriteRawTag(40);
				output.WriteEnum((int)this.ChestType);
			}
			if (this.ExistNum != 0U)
			{
				output.WriteRawTag(56);
				output.WriteUInt32(this.ExistNum);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x0600207E RID: 8318 RVA: 0x0005C0F8 File Offset: 0x0005A2F8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.ChestType != ChestType.MapInfoChestTypeNone)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.ChestType);
			}
			if (this.OpenedNum != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.OpenedNum);
			}
			if (this.ExistNum != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.ExistNum);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x0600207F RID: 8319 RVA: 0x0005C168 File Offset: 0x0005A368
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(ChestInfo other)
		{
			if (other == null)
			{
				return;
			}
			if (other.ChestType != ChestType.MapInfoChestTypeNone)
			{
				this.ChestType = other.ChestType;
			}
			if (other.OpenedNum != 0U)
			{
				this.OpenedNum = other.OpenedNum;
			}
			if (other.ExistNum != 0U)
			{
				this.ExistNum = other.ExistNum;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06002080 RID: 8320 RVA: 0x0005C1CC File Offset: 0x0005A3CC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06002081 RID: 8321 RVA: 0x0005C1D8 File Offset: 0x0005A3D8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num != 8U)
				{
					if (num != 40U)
					{
						if (num != 56U)
						{
							this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
						}
						else
						{
							this.ExistNum = input.ReadUInt32();
						}
					}
					else
					{
						this.ChestType = (ChestType)input.ReadEnum();
					}
				}
				else
				{
					this.OpenedNum = input.ReadUInt32();
				}
			}
		}

		// Token: 0x04000D43 RID: 3395
		private static readonly MessageParser<ChestInfo> _parser = new MessageParser<ChestInfo>(() => new ChestInfo());

		// Token: 0x04000D44 RID: 3396
		private UnknownFieldSet _unknownFields;

		// Token: 0x04000D45 RID: 3397
		public const int ChestTypeFieldNumber = 5;

		// Token: 0x04000D46 RID: 3398
		private ChestType chestType_;

		// Token: 0x04000D47 RID: 3399
		public const int OpenedNumFieldNumber = 1;

		// Token: 0x04000D48 RID: 3400
		private uint openedNum_;

		// Token: 0x04000D49 RID: 3401
		public const int ExistNumFieldNumber = 7;

		// Token: 0x04000D4A RID: 3402
		private uint existNum_;
	}
}
